package listener_pattern;

import java.util.Observable;
import java.util.Observer;

/**
 * @ClassName:
 * @Description: ServletContext 模拟 Servlet 根目录 即/catalog
 * @Author: LynnZou
 * @Date: 2017/6/16
 */
public class ServletContext extends Observable {


    @Override
    public synchronized void addObserver(Observer o) {
        super.addObserver(o);
    }

    @Override
    public void notifyObservers(Object arg) {
        if (null != arg) {
            setChanged();
        }
        super.notifyObservers(arg);
    }
}
